extends "../../azurlane_ctrl/AzurItem.gd"
func init():
	.init()
	name = "[普通]四神之力"
	att.atk = 33
	att.mgiAtk = 33
	att.def = 33
	att.air = 33
	info = "<限定>本回合内，死亡后，满血复活\n[color=#DC143C]同时装备三件时可升级[/color]"
	
func _connect():
	._connect()
	masCha.connect("onDeath", self, "onDeath")
	sys.main.connect("onBattleStart",self,"start")

var enable = true
func start():
	enable = true
func onDeath(atkInfo):
	if enable and masCha.isDeath:
		enable = false
		masCha.isDeath = false
		if masCha.type == sys.CharaClass.BOSS:
			masCha.healCha(masCha, masCha.att.maxHp*0.15)
		else:
			masCha.healCha(masCha, masCha.att.maxHp)

func upgrade():
	name = "[color=#FFFF00][史诗]四神之力"

	att.atk = 66
	att.mgiAtk = 66
	att.def = 66
	att.air = 66

	info = "<限定>本回合内，死亡后，满血复活"